<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="UTF-8">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/font-awesome.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/main.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/carousel.css">
    <style>
        .tree li {
            list-style-type: none;
            cursor: pointer;
        }

        table tbody tr:nth-child(odd) {
            background: #F4F4F4;
        }

        table tbody td:nth-child(even) {
            color: #C00;
        }
    </style>
</head>

<body>
<div class="navbar-wrapper ">
    <%--动态导入另一个jsp页面，作用：将公共使用的部分提取出来，然后使用动态导入
              动态导入是不会导入include页面的编译指令的，而是仅仅将被导入页面的body内容插入本页面。--%>
    <jsp:include page="admin-header.jsp"></jsp:include>
</div>
<div class="container-fluid">
    <div class="row">
        <%--动态导入另一个jsp页面，作用：将公共使用的部分提取出来，然后使用动态导入
                动态导入是不会导入include页面的编译指令的，而是仅仅将被导入页面的body内容插入本页面。--%>
        <jsp:include page="admin-left.jsp"></jsp:include>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h1 class="panel-title" id="msg"><i class="glyphicon glyphicon-th"></i></h1>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
<script src="${pageContext.request.contextPath}/resources/jquery/jquery-2.1.1.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/script/docs.min.js"></script>
<script type="text/javascript">
    var statusMsg =${StatusMsg};
    //alert(statusMsg);
    if (statusMsg == 1) {
        window.onload = function () {
            msg.innerHTML = "成功";
            my = setInterval("jsq()", 1000);
        }
        var count = 3;

        function jsq() {
            if (count <= 0) {
                location.replace("/tbEssay/searchEssays");
                // window.close();
            } else {
                msg.innerHTML = count + "秒后返回报修清单管理";
                count--;
            }
        }
    } else if (statusMsg == 2) {
        window.onload = function () {
            msg.innerHTML = "失败";
            my = setInterval("jsq()", 1000);
        }
        var count = 3;

        function jsq() {
            if (count <= 0) {
                location.replace("/addEssay");
                // window.close();
            } else {
                msg.innerHTML = count + "秒后返回，请重新添加";
                count--;
            }
        }
    }

</script>
</html>
